/*********************************************************************//**
 * @defgroup Debounce Debounce
 * @{
 * @brief    libmanyuc Debouncing input definitions
 * @date     2012
 * @author   Copyright (C) 2013 - Margarita Manterola Rivero
 *
 * @par
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * @par
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * @par
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301 USA
 *
 ************************************************************************/

#ifndef _DEBOUNCE_H
#define _DEBOUNCE_H

#ifdef __cplusplus
extern "C" {
#endif

#include "port.h"
#include "io.h"

    /** Reads the state of the pin using a debounce function.
     *  This function is architecture independent.
     *  @param pin A pin created through Pin_Get or Pin_Init.
     *  @return The state of the pin (0 or 1), after waiting for
     *  it to stabilize.
     */
    int Pin_Read_Debounce_SW(Pin_t pin);

    /** Reads the state of the pin using a debounce function.
     *  This function is architecture dependant, might use hardware
     *  debounce if available, or might call the software debounce if not.
     *  @param pin A pin created through Pin_Get or Pin_Init.
     *  @return The state of the pin (0 or 1), after waiting for
     *  it to stabilize.
     */
    int Pin_Read_Debounce(Pin_t pin);

//@}

#ifdef __cplusplus
}
#endif

#endif
// vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
